public interface CollAHost
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(CollAHost host)
Compares two CollAHosts
|
java.util.HashMap<java.lang.String,java.lang.String> |
getActivities() |
java.lang.String |
getCountry() |
java.lang.String |
getIp() |
java.lang.String |
getName() |
java.lang.String |
getNameUser() |
int |
getPort() |
java.lang.String |
getSystemProperties() |
java.lang.String |
getTempoTotalConexao() |
boolean |
hasValidIP() |
void |
invalidateIP()
Determines that the machine doesn't have a public IP accessible over the
Internet and may be behind a NAT or firewall.
|
boolean |
IsOnline()
Return either true or false for connection status.
|
void |
recordActivities(java.lang.String date,
java.lang.String activity)
Records CollAHost activities performed on the server.
|
void |
setActivities(java.util.HashMap<java.lang.String,java.lang.String> map) |
void |
setCountry(java.lang.String cntry)
Sets current country of host.
|
void |
setInicioConexao()
Sets current time when connection to server is established.
|
void |
setIp(java.lang.String ip)
Sets a String representing the IP address of the machine in which host is running.
|
void |
setName(java.lang.String name)
Sets a name for the host
|
void |
setNameUser(java.lang.String nameUser)
Sets the name of the host's owner
|
void |
setOffline()
Sets online status as false
|
void |
setOnline()
Sets online status as true
|
void |
setPort(int port)
Sets port number in which the machine will listen if
it has a valid IP
|
java.lang.String |
toString() |
void |
validateIP()
Determines that the host has a public IP accessible over the Internet
|
int compareTo(CollAHost host)
host - a CollAHost to be compared to the one that invokes this method.java.lang.String getSystemProperties()
void validateIP()
void invalidateIP()
boolean hasValidIP()
void setName(java.lang.String name)
name - void setNameUser(java.lang.String nameUser)
nameUser - The name of the host's ownervoid setIp(java.lang.String ip)
ip - IP address of the machinevoid setPort(int port)
port - a port numbervoid setOnline()
void setOffline()
boolean IsOnline()
java.lang.String getName()
java.lang.String getNameUser()
java.lang.String getIp()
int getPort()
void setInicioConexao()
java.lang.String getTempoTotalConexao()
void recordActivities(java.lang.String date,
java.lang.String activity)
date - date on which the activity was performedactivity - description of the activityvoid setActivities(java.util.HashMap<java.lang.String,java.lang.String> map)
map - map of activities performed on the server that has their dates as keys.java.util.HashMap<java.lang.String,java.lang.String> getActivities()
void setCountry(java.lang.String cntry)
cntry - java.lang.String getCountry()
java.lang.String toString()
toString in class java.lang.Object